String.prototype.[Symbol.iterator]

The String iterator iterates over the String by code points.

Syntax

[Symbol.iterator]()

Example

for (let ch of "hello") {
  print(ch)
}
h
e
l
l
o